package com.icow.wms.basic.service.impl;

import com.icow.wms.basic.domain.LocationDomain;
import com.icow.wms.basic.mapper.LocationDomainMapper;
import com.icow.wms.basic.service.ILocationDomainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * LocationService业务层处理
 *
 * @author ly
 * @date 2021-02-08
 */
@Service
public class LocationDomainServiceImpl implements ILocationDomainService {

    @Autowired
    private LocationDomainMapper locationDomainMapper;

    /**
     * 查询Location
     *
     * @param id LocationID
     * @return Location
     */
    @Override
    public LocationDomain selectLocationDomainById(Long id) {
        return locationDomainMapper.selectLocationDomainById(id);
    }

    /**
     * 查询Location列表
     *
     * @param locationDomain LocationDomain
     * @return LocationDomain集合
     */
    @Override
    public List<LocationDomain> selectLocationDomainList(LocationDomain locationDomain) {
        return locationDomainMapper.selectLocationDomainList(locationDomain);
    }

    /**
     * 新增Location
     *
     * @param locationDomain LocationDomain
     * @return 结果
     */
    @Override
    public int insertLocationDomain(LocationDomain locationDomain) {
        return locationDomainMapper.insertLocationDomain(locationDomain);
    }

    /**
     * 修改Location
     *
     * @param locationDomain Location
     * @return 结果
     */
    @Override
    public int updateLocationDomain(LocationDomain locationDomain) {
        return locationDomainMapper.updateLocationDomain(locationDomain);
    }

    /**
     * 批量删除Location
     *
     * @param ids 需要删除的LocationID
     * @return 结果
     */
    @Override
    public int deleteLocationDomainByIds(Long[] ids) {
        return locationDomainMapper.deleteLocationDomainByIds(ids);
    }

    /**
     * 删除Location信息
     *
     * @param id LocationID
     * @return 结果
     */
    @Override
    public int deleteLocationDomainById(Long id) {
        return locationDomainMapper.deleteLocationDomainById(id);
    }
}
